package com.designpatterns.decoratorpattern;

import com.designpatterns.decoratorpattern.component.Coffee;
import com.designpatterns.decoratorpattern.component.EspressoCoffee;
import com.designpatterns.decoratorpattern.decorator.DecoratorMilk;
import com.designpatterns.decoratorpattern.decorator.DecoratorSugr;

public class TestDecoratorPattern {
    public static void main(String[] args) {
        Coffee coffee = new EspressoCoffee();
        System.out.println(coffee.getDescription()+" "+coffee.cost());
        coffee = new DecoratorSugr(coffee);
        coffee = new DecoratorMilk(coffee);
        coffee = new DecoratorMilk(coffee);
        System.out.println(coffee.getDescription()+" "+coffee.cost());
    }

}
